<?php

class ErrorController extends BaseController {

    public function index() {

        $aData = array(
            'sPage_Title'       => '',
            'sPage_Description' => '',
            'code'              => Session::get('code'),
            'message'           => Session::get('message'),
        );

        if (strpos(Request::header('accept'), 'application/json') !== false) {
            return Response::json($aData);
        } else {
            return View::make("error.page", $aData);
        }
    }

}
